package com.study.kafkademo.kafka.custom.model;

import lombok.Data;

import java.io.Serializable;

/**
 * @Classname KafkaMessage
 * @Description TODO 消息定义
 * @Author kexl
 * @Date 2020/7/3 10:29
 * @Version 1.0
 */
@Data
public class KafkaMessage<T> implements Serializable, Cloneable {
    /**
     * 统一消息头
     */
    protected KafkaMessageHeader messageHeader;

    /**
     * JSON格式消息体
     */
    private T date;

    public KafkaMessage() {

    }

    public KafkaMessage(KafkaMessageHeader messageHeader, T date) {
        this.messageHeader = messageHeader;
        this.date = date;
    }

}
